package com.dh.str;

import java.util.Scanner;

public class StringDemo02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个网址：");
        String webSite = scanner.next();
        if (webSite.startsWith("http://") || webSite.startsWith("https://")) {
            System.out.println("合法");
        } else {
            System.out.println("不合法");
        }
    }
}
